UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yHvzRF4mNEL9bCpLPB7EIzrOj2zH3dddkMfeC3FDUsY=' 
WHERE 
  key_id = '473dbecd39bd6e101bb06ec282c9b8ac8d182a43fa0556bf9f4d0028406900d3' 
  AND (
    token = 'yHvzRF4mNEL9bCpLPB7EIzrOj2zH3dddkMfeC3FDUsY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027