UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aR3zBdtohvaQ8gqO2R8t0BZ7mjB4LyusFFM1XLGOP5o='
WHERE
key_id = '83660a95245579be2db0916e0b7297471a321bc45e7d888d9d1a00cc55795bf3'
AND (
token = 'aR3zBdtohvaQ8gqO2R8t0BZ7mjB4LyusFFM1XLGOP5o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)