UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FYcIOni95Nf7u1mFsUQLHGsNpsYf9TzQITOexYvs908=' 
WHERE 
  key_id = '14c4fc44f73aa27671ac27ee815d63924744d3bf5f94e8fa80bb05f411b13a13' 
  AND (
    token = 'FYcIOni95Nf7u1mFsUQLHGsNpsYf9TzQITOexYvs908=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027