UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0kHYGgjLZAJqxocMS1zcpCmo0OAEl6UZa+j+iZgZAto=' 
WHERE 
  key_id = 'df0ed6fe678c2991b442457ee39a414837193ad2fd397ac7e1999dc2db088e5d' 
  AND (
    token = '0kHYGgjLZAJqxocMS1zcpCmo0OAEl6UZa+j+iZgZAto=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033