UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aGEd1cWqU5oMR6XMK2MUMH/GMq5GCGG3I6+QiR9s7Ik=' 
WHERE 
  key_id = '63fae878d503f0ed7abc56ab2dcb64eb738656e6a06a36052e0dff1b827415cc' 
  AND (
    token = 'aGEd1cWqU5oMR6XMK2MUMH/GMq5GCGG3I6+QiR9s7Ik=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031