UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y7/2Rh1KKaWJgzD0BvMK7KbAGzbnhHq/zdeRp1teTvQ='
WHERE
key_id = '055946dd633caf0e8ff770ea57ad638d00f0c61e940eb140d569d4a461fb545c'
AND (
token = 'y7/2Rh1KKaWJgzD0BvMK7KbAGzbnhHq/zdeRp1teTvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)