UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mU2UEcMcZIVw4AzYEqrS5yk15ZF21Djd3hnpS97uU4E=' 
WHERE 
  key_id = 'f11c535c504f1de7b968fad5db5f1633daa32608fad28067e4900c79731aebe4' 
  AND (
    token = 'mU2UEcMcZIVw4AzYEqrS5yk15ZF21Djd3hnpS97uU4E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017