UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eae8hdsqZT6hCeiLJDXa+mgbOkeGoMnZxXrebXeANZs=' 
WHERE 
  key_id = '92c4af4517f72f2339eca968b7dc88cb9cc98f0f0f5898e39c78d7bf0f2229c7' 
  AND (
    token = 'eae8hdsqZT6hCeiLJDXa+mgbOkeGoMnZxXrebXeANZs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024