UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FFBhhApvZyyCD30JXM9ql62M+HbrOVo9zoZWWB4FPpw=' 
WHERE 
  key_id = '44ba66720b13179f59bec69f806474ea0a5b0b56e6b0f3747391c9ea7301c08c' 
  AND (
    token = 'FFBhhApvZyyCD30JXM9ql62M+HbrOVo9zoZWWB4FPpw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031