UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2chUopLVIU6VEzhbwEyy2K7nFm+11AQkh0EiScsERK0=' 
WHERE 
  key_id = '6e3fcb2fe4fdca434e0d54ef4d3c7bdc717b77b2b3a6c108787f8f661210d768' 
  AND (
    token = '2chUopLVIU6VEzhbwEyy2K7nFm+11AQkh0EiScsERK0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037