UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gv2Y/dWGD2iziu/RbCMXEq/ycubJaaPWxkcWUqDoswg='
WHERE
key_id = '32184dc56b9b15827fc6d0a4a6605013ba07f0f028c4b982fbe2892bc510045c'
AND (
token = 'gv2Y/dWGD2iziu/RbCMXEq/ycubJaaPWxkcWUqDoswg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)