UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gbOdMKvva2cA4Y5nObsVt24DnPVRC1+RUfFMi/IuHCo='
WHERE
key_id = '06cb8d52d4731b2665b1a08be992fb95f79f3b29940a446db844a97c4fcc5a78'
AND (
token = 'gbOdMKvva2cA4Y5nObsVt24DnPVRC1+RUfFMi/IuHCo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)