UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PX25u4n33XQaAHs/A3ug9vVXE5fu6qp9V+QhwjRSm5Q=' 
WHERE 
  key_id = 'aabe2ab0c873a9358fca9bba98f2190254acd9deee1e7e6b625d2428ec747c79' 
  AND (
    token = 'PX25u4n33XQaAHs/A3ug9vVXE5fu6qp9V+QhwjRSm5Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047