UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jOrOb1F3szHNrSuiDUhJbqKmWnnnZQlSqdU/XHrEAHE=' 
WHERE 
  key_id = 'db8a5cc3fc4970ef9916cae073b2281c6c54ba3525a49ca12bb19f495fb49b94' 
  AND (
    token = 'jOrOb1F3szHNrSuiDUhJbqKmWnnnZQlSqdU/XHrEAHE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024