UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zfh222suDo+JO92Xls0PZAooO24WBXLRLuOV0c+Bz2s='
WHERE
key_id = 'fc0d516d4400b68c71f2676eff345ca9c770a7bea4b36ed02cf0b19462eea57a'
AND (
token = 'zfh222suDo+JO92Xls0PZAooO24WBXLRLuOV0c+Bz2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)