UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/pG2xu2Z0Mwz6tbouJld0Rp8fHqU8MXBEDHcJZS/o5o=' 
WHERE 
  key_id = '975892e7c8330f1d76207c99a73a22dcffa95ddfc9f593b5c3b502166f098c91' 
  AND (
    token = '/pG2xu2Z0Mwz6tbouJld0Rp8fHqU8MXBEDHcJZS/o5o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030