UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's/bjKRflkQ2mcG+CJ3vIDGmcVMtrFGP7mU9taimkWX0='
WHERE
key_id = '0cc9c43c0de1399a37ccce39a89c4097830d430747b1a6cfd8782f9b3c284054'
AND (
token = 's/bjKRflkQ2mcG+CJ3vIDGmcVMtrFGP7mU9taimkWX0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)