UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RSx5f/oSdv6UxB7P8h/obGXMk739JECtdn/Tgibp0Wc='
WHERE
key_id = '053fb9eedc925c94aa15843befb78d0ba167176661d2fa7e81fc3dfd14449edc'
AND (
token = 'RSx5f/oSdv6UxB7P8h/obGXMk739JECtdn/Tgibp0Wc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)