UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ikmzPM5Rm4Pxkdo4H2jQSnqJSEjiy/J0r2ARbBwiKF8='
WHERE
key_id = '3d8f6158cc0f13b8cece3eb7e2afe46f49f87960617301cc0f116bd342e5d128'
AND (
token = 'ikmzPM5Rm4Pxkdo4H2jQSnqJSEjiy/J0r2ARbBwiKF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)