UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tyA3AVqDNM8zFFNBvxWtpxec5INZcVhBF2d/tp0/r2Q='
WHERE
key_id = '15c81e6184199bfdf156e9ef726521f7d70785d98cca845a8fcfa6485c95edab'
AND (
token = 'tyA3AVqDNM8zFFNBvxWtpxec5INZcVhBF2d/tp0/r2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)