UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5k1B8Qw9c0adwxLkt8M8vN/Kwl4iCeNkIzm3L1Rs3lo=' 
WHERE 
  key_id = '4eb46a9c27bdcbba4ea41d8064ae9d7d6b2e0a4b078f1b6bbbebe680f68616b3' 
  AND (
    token = '5k1B8Qw9c0adwxLkt8M8vN/Kwl4iCeNkIzm3L1Rs3lo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051