UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8cwO/Sng51rk8V519D0ji8m0iKY4gSA/0ez80d02clU='
WHERE
key_id = 'a91e0f6f36f6cf97f390b8746ddba50c4c7f9fada86af9850bd6a9dbcc4b6854'
AND (
token = '8cwO/Sng51rk8V519D0ji8m0iKY4gSA/0ez80d02clU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)