UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zozvcpVT38J10smxHBea8Wch/A34q/1Lj0Iy0fbRqmU='
WHERE
key_id = '07083fed6b98f8123966e0699bfa7c32f23d19a31cef17a4104949112b5379bd'
AND (
token = 'zozvcpVT38J10smxHBea8Wch/A34q/1Lj0Iy0fbRqmU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)