UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BuvqO3jDUiMHWbLtbnR54GaMW/m91Zo76jbuEc+Udz0='
WHERE
key_id = '210d8bdaea16ed7c47ca5ae3a60cfb06deaf51844af1275188b2a5b1aef6cf1c'
AND (
token = 'BuvqO3jDUiMHWbLtbnR54GaMW/m91Zo76jbuEc+Udz0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)