UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oaMvPYetcSi1MBoy7ZcHxO3q+HsDFd6Mnr3rH8H/bEU=' 
WHERE 
  key_id = '69dc9dcdc327595aec5d45d8b9571baab46ebae7a0642f52938cfea6f27a577a' 
  AND (
    token = 'oaMvPYetcSi1MBoy7ZcHxO3q+HsDFd6Mnr3rH8H/bEU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015