UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qCHtk3QuuXMy2chvvaTTXSV2DDY3GAkum07UFifdZpQ=' 
WHERE 
  key_id = '07ddf48da49e9ffb99f4bebc7bfed2832c9b63b2366950299d2717e4442a5324' 
  AND (
    token = 'qCHtk3QuuXMy2chvvaTTXSV2DDY3GAkum07UFifdZpQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024